package com.changgou.seckill.service;

import entity.SeckillStatus;

/**
 * @author:hushengjin
 * @date:2019-08-12 20:49:32
 */
public interface SeckillOrderService {

    /**
     * 添加秒杀商品
     *
     * @param time
     * @param id
     * @param username
     * @return
     */
    Boolean add(String time, Long id, String username);

    /**
     * 抢单状态查询
     *
     * @param username
     * @return
     */
    SeckillStatus queryStatus(String username);

    /**
     * 更新订单状态
     *
     * @param out_trade_no
     * @param transaction_id
     * @param username
     */
    void updatePayStatus(String out_trade_no, String transaction_id,String username);

    /**
     * 关闭订单,回滚数据
     *
     * @param username
     */
    void closeOrder(String username);

}
